<template>
  <!-- 矩形节点 -->
  <div class="rect-node">
    <!-- <Handle type="target" :position="Position.Top" /> -->
    <!-- <Handle type="target" :position="Position.Left" /> -->
    <slot name="top" />
    <div class="node-content">
      {{ data.label }}
    </div>
    <slot name="bottom" />
    <!-- <Handle type="source" :position="Position.Right" /> -->
    <!-- <Handle type="source" :position="Position.Bottom" /> -->
  </div>
</template>

<script setup lang="ts">
interface Props {
  id: string
  data: {
    label: string
    nodeType: string
  }
}

defineProps<Props>()
</script>

<style scoped>
.rect-node {
  /* width: 80px; */
  /* height: 50px; */
  padding: 10px;
  background: #fff;
  border: 1px solid #000;
  /* border-radius: 4px; */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.node-content {
  text-align: center;
  font-size: 12px;
  color: #000;
  /* overflow: hidden; */
  /* text-overflow: ellipsis; */
  font-weight: 500;
}
</style>
